#放置电池
data modify entity @s item.components."minecraft:custom_data".guardTowerData.PowerInputEmpty set value false
function util:entity_owner/find_son_distance10 with entity @s

execute as @e[tag=son_entity,distance=..10,type=item_display,tag=guardTower.powerItemDisplay] at @s run function vs:system/game_ctrol/guard_tower/power/item_display/place_battery
item replace entity @p[tag=clicker] weapon.mainhand with air

tag @e[distance=..10,tag=son_entity] remove son_entity